﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Timers;
using System.Threading.Tasks;
using Nest;

namespace CSharp实现Unity协程
{
    /// <summary>
    /// 按秒等待
    /// </summary>
    class WaitForSeconds : IWait
    {
        float _seconds = 0f;

        public WaitForSeconds(float seconds)
        {
            _seconds = seconds;
        }

        public bool Tick()
        {
            _seconds -= Time.deltaTime;
            return _seconds <= 0;
        }
    }
}
